package coreentity

import (
	"core/class"
	"core/datetime"
	"core/selfreg"
	"reflect"
)

type HtUser struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Name string `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:姓名;"`

	Ename    string          `json:"ename"        validate:"required,max=50"   gorm:"column:ename;size:50;DEFAULT:'';not null;comment:账号;"`
	Pwd      string          `json:"pwd"          validate:"max=50"   gorm:"column:pwd;size:50;DEFAULT:'';not null;comment:密码;"`
	Czpwd    string          `json:"czpwd"        validate:"max=50"   gorm:"column:czpwd;size:50;DEFAULT:'';not null;comment:密码;"`
	Mobile   string          `json:"mobile"       validate:"max=50"   gorm:"column:mobile;size:50;DEFAULT:'';not null;comment:手机号;"`
	Phone    string          `json:"phone"        validate:"max=50"   gorm:"column:phone;size:50;DEFAULT:'';not null;comment:其他电话;"`
	Sex      string          `json:"sex"          validate:"max=10"   gorm:"column:sex;size:10;DEFAULT:'';not null;comment:性别;memo:男、女;"`
	Url      string          `json:"url"                              gorm:"column:url;DEFAULT:'';not null;comment:照片;"`
	Zw       string          `json:"zw"           validate:"max=50"   gorm:"column:zw;size:50;DEFAULT:'';not null;comment:职务;"`
	Birthday datetime.MyTime `json:"birthday"                         gorm:"column:birthday;not null;comment:出生日期;"`
	Address  string          `json:"address"      validate:"max=100"  gorm:"column:address;size:100;DEFAULT:'';not null;comment:住址;"`
	Email    string          `json:"email"        validate:"max=100"  gorm:"column:email;size:100;DEFAULT:'';not null;comment:邮箱;"`
	IdCode   string          `json:"idCode"       validate:"max=50"   gorm:"column:id_code;size:50;DEFAULT:'';not null;comment:身份证号;"`
	Memo     string          `json:"memo"                             gorm:"column:memo;DEFAULT:'';not null;comment:备注;"`
	HtareaId int64           `json:"htareaId,string"                    gorm:"column:htarea_id;DEFAULT:0;not null;comment:区域编号;"`

	CrtDt   datetime.MyTime    `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid  int64              `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:创建人编号;"`
	CrtDid  int64              `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
	EdtDt   datetime.MyTime    `json:"edtDt"                            gorm:"column:edt_dt;not null;comment:修改日期;"`
	EdtUid  int64              `json:"edtUid,string"                    gorm:"column:edt_uid;DEFAULT:0;not null;comment:修改人编号;"`
	Gid     string             `json:"gid"                              gorm:"column:gid;DEFAULT:'';type:char(36);not null;comment:Gid;"`
	Deleted datetime.DeletedAt `json:"deleted"                          gorm:"column:deleted;DEFAULT:0;type:tinyint(1);not null;comment:删除标志;"`
}

func (p *HtUser) TableName() string {
	return "HtUser"
}
func init() {

	var mcls = &HtUser{}
	var m = &class.MyClass{
		Name:     "用户表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  "",
		Type:     reflect.TypeOf(mcls),
	}
	selfreg.AddEntity(m)
}
